// @ts-ignore
import result from '/@utils/Axios.ts'

export function registerAccount(query:any) {
  return result({
    url:'/api/hzadmin/auth/register/',
    method:'post',
    data:query,
  })
}

export function loginIn(query:any) {
  return result({
    url:'/api/hzadmin/auth/login/',
    method:'post',
    data:query,
  })
}

export function getUserInfo() {
    return result({
        url:'/api/hzadmin/auth/userinfo/',
        method:'get',
    })
}

export function getUserInfo2(id: number){
    return result({
        url: `/api/hzadmin/user/info/${id}/`,
        method:'get',
    })
}

export function setUserInfo(query:any) {
    return result({
        url:'/api/hzadmin/auth/userinfo/',
        method:'post',
        data:query,
    })
}

export function logOut(query:any) {
  return result({
    url:'/api/hzadmin/auth/logout',
    method:'get',
    params:query
  })
}

export function changePassword(query:any) {
  return result({
    url:'/api/hzadmin/auth/changePassword/',
    method:'post',
    data:query
  })
}

export function change_user_info(query:any, user_id){
    return result({
        url:'/api/hzadmin/user/info/update/' + user_id + '/',
        method:'post',
        data:query
    })
}


